home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / XML Utilities / Professional Programmer XSL IDE / Xselerator25.msi / Data.Cab / F42316_test2BuildListWhile.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2001-12-16  |  1.4 KB  |  39 lines

  1. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  2. xmlns:pGenerator="pGenerator"
  3. xmlns:pController="pController" 
  4. exclude-result-prefixes="xsl pGenerator pController" 
  5. >
  6.   <xsl:import href="buildListWhile.xsl"/> 
  7.   
  8.   <xsl:output indent="yes" omit-xml-declaration="yes"/>
  9.   
  10.   <pGenerator:pGenerator/>
  11.   <pController:pController/>
  12.  
  13.   <xsl:variable name="vMyGenerator" select="document('')/*/pGenerator:*[1]"/>
  14.   <xsl:variable name="vMyController" select="document('')/*/pController:*[1]"/>
  15.   
  16.   <xsl:template match="/">
  17.     <xsl:call-template name="buildListWhile">
  18.       <xsl:with-param name="pGenerator" select="$vMyGenerator"/>
  19.       <xsl:with-param name="pController" select="$vMyController"/>
  20.       <xsl:with-param name="pContollerParam" select="10"/>
  21.       <xsl:with-param name="pElementName" select="'indoctrinate'"/>
  22.     </xsl:call-template>
  23.   </xsl:template>
  24.  
  25.   <xsl:template name="listGenerator" match="*[namespace-uri()='pGenerator']">
  26.      <xsl:param name="pList" select="/.."/>
  27.      <xsl:param name="pParams"/>
  28.      I should understand loops as being syntax for a simple form of
  29.      recursion.
  30.   </xsl:template>
  31.   
  32.   <xsl:template name="listController" match="*[namespace-uri()='pController']">
  33.      <xsl:param name="pList" select="/.."/>
  34.      <xsl:param name="pParams"/>
  35.      
  36.      <xsl:if test="count($pList) <= $pParams">1</xsl:if>
  37.   </xsl:template>
  38.  
  39. </xsl:stylesheet>